import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import Login from '@/views/LoginView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    meta:{
      title:"智能电子超市客户端"
    },
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    meta:{
      title:"智能电子超市客户端"
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path:'/login',
    name:'Login',
    meta:{
      title:"智能电子超市客户端"
    },
    component:Login
  },
  {
    path:'/testview',
    name:'testview',
    meta:{
      title:"智能电子超市客户端"
    },
    component: () => import(/* webpackChunkName: "about" */ '../views/TestView.vue')
  },
  {
    path:'/orderList',
    name:'orderList',
    meta:{
      title:"智能电子超市客户端-订单页面"
    },
    component: () => import(/* webpackChunkName: "about" */ '../views/orderList.vue')
  },
  {
    path:'/payment',
    name:'PaymentView',
    meta:{
      title:"智能电子超市客户端-结算页面"
    },
    component: () => import(/* webpackChunkName: "about" */ '../views/PaymentView.vue')
  },
  {
    path:'/paysuccess',
    name:'PaySuccessView',
    meta:{
      title:"智能电子超市客户端-支付成功"
    },
    component: () => import(/* webpackChunkName: "about" */ '../views/PaySuccessView.vue')
  }
]



const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
